//author:jxx
//此处是对表单的方法，组件，权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
import MebcardKK from "../../views/mall/MebcardKK.vue"
let extension = {
    components: {//动态扩充组件或组件路径
        //表单header、content、footer对应位置扩充的组件
        gridHeader: '',//{ template: "<div>扩展组xx件</div>" },
        gridBody: MebcardKK,
        gridFooter: '',
        //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
        modelHeader: '',
        modelBody: '',
        modelFooter: ''
    },
    buttons: {
        view: [
            {
                name: "新建",
                icon: 'md-add',
                value: 'XJ',
                class: '',
                type: 'error',
                index: 1,//显示的位置
                onClick: function () {
                    this.$refs.gridBody.model = true;
                    this.$refs.gridBody.title = '优惠券模板--新增'
                    this.$nextTick(() => {
                        this.$refs.gridBody.$refs.editFormFields.resetFields()
                        this.$refs.gridBody.GetVueDictionary()
                        this.$refs.gridBody.$refs.myform.reset()
                        this.$refs.gridBody.formFields1.coupon_cover = ''
                        this.$refs.gridBody.cascaderValue = ''
                        this.$refs.gridBody.editFormFields.applicability = ''
                    })
                }
            },
        ], box: [], detail: []
    },//扩展的按钮
    methods: {//事件扩展
        onInit() {

        }, rowClick({ row, column, event }) { //查询界面table点击行选中当前行
            this.$refs.table.$refs.table.toggleRowSelection(row);
            return true;
        },
    }
};
export default extension;